Skip to content

feat: add showMultiDayTimes property to calendar component#2204

Merged
rahmanunver merged 7 commits into
mainfrom
feat/showMultiDayTimes_Property-migrated
Jul 27, 2026
Merged

feat: add showMultiDayTimes property to calendar component#2204
rahmanunver merged 7 commits into
mainfrom
feat/showMultiDayTimes_Property-migrated

Conversation

@iobuhov

@iobuhov iobuhov commented May 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR adds the showMultiDayTimes property to the calendar component.

Migrated from #2121 (cherry-picked onto fresh main branch to resolve conflicts).

Original PR

#2121

🤖 Generated with Claude Code

@github-actions

This comment has been minimized.

samuelreichert
samuelreichert previously approved these changes May 7, 2026
@github-actions

This comment has been minimized.

@gjulivan

Copy link
Copy Markdown
Collaborator

gjulivan
gjulivan previously approved these changes Jul 14, 2026
leonardomendix
leonardomendix previously approved these changes Jul 22, 2026
@iobuhov
iobuhov dismissed stale reviews from leonardomendix and gjulivan via 5840800 July 23, 2026 08:05
@iobuhov
iobuhov force-pushed the feat/showMultiDayTimes_Property-migrated branch from 263dd20 to 5840800 Compare July 23, 2026 08:05
@github-actions

This comment has been minimized.

gjulivan
gjulivan previously approved these changes Jul 23, 2026
@github-actions

This comment has been minimized.

leonardomendix
leonardomendix previously approved these changes Jul 23, 2026
HeikoOsigus and others added 7 commits July 27, 2026 15:00
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…e in specs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…po installs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@iobuhov
iobuhov force-pushed the feat/showMultiDayTimes_Property-migrated branch from 9fb3c0e to b296db1 Compare July 27, 2026 13:02
@github-actions

Copy link
Copy Markdown
Contributor

AI Code Review

⚠️ Approved with suggestions — low-severity items only, safe to merge


What was reviewed

File Change
packages/pluggableWidgets/calendar-web/CHANGELOG.md Added entry for new showMultiDayTimes property
packages/pluggableWidgets/calendar-web/src/Calendar.xml Added showMultiDayTimes boolean property in week/day group
packages/pluggableWidgets/calendar-web/typings/CalendarProps.d.ts Added showMultiDayTimes: boolean to container and preview props
packages/pluggableWidgets/calendar-web/src/helpers/CalendarPropsBuilder.ts Pass-through of showMultiDayTimes; added eventTimeRangeStartFormat / eventTimeRangeEndFormat; blanks them when showEventDate=false
packages/pluggableWidgets/calendar-web/src/__tests__/Calendar.spec.tsx New describe blocks for showMultiDayTimes, multi-day formats, and showEventDate hiding
packages/pluggableWidgets/calendar-web/src/__tests__/__snapshots__/Calendar.spec.tsx.snap Snapshot updated for new data-show-multi-day-times, data-min, data-max attributes
pnpm-workspace.yaml Added recursiveInstall: true; reformatted with 4-space indentation

Skipped (out of scope): openspec/changes/**, pnpm-lock.yaml

CI status: security/snyk check is FAILING (see finding below). All other completed checks passed.


Findings

🔶 Medium — Snyk security check is failing

File: PR checks
Problem: The security/snyk (AppDev AppStore content) check returned FAILURE. While the code/snyk and license/snyk checks both passed, the security check failure warrants investigation before merge — it may indicate a newly introduced vulnerable dependency or a policy violation triggered by the pnpm-workspace.yaml change adding recursiveInstall: true.
Fix: Review the Snyk report at the linked URL in the PR checks and confirm the failure is either a pre-existing issue unrelated to this PR, or address it if it is caused by this change.


⚠️ Low — pnpm-workspace.yaml change is unrelated to the feature

File: pnpm-workspace.yaml line 1
Note: The addition of recursiveInstall: true and reformatting of the YAML indentation are unrelated to the showMultiDayTimes feature. This couples a workspace-level config change with a widget feature PR. If intentional (e.g. resolving a local install issue), it is harmless but worth calling out. Consider splitting it into a separate chore PR to keep the diff focused, and to simplify bisecting if the workspace change causes issues.


⚠️ Low — eventTimeRangeStartFormat / eventTimeRangeEndFormat set unconditionally alongside eventTimeRangeFormat

File: packages/pluggableWidgets/calendar-web/src/helpers/CalendarPropsBuilder.ts lines 178–187
Note: The start and end formats are always set whenever a timeFormat is configured, regardless of the value of showMultiDayTimes. In react-big-calendar, these formats only take effect when showMultiDayTimes=true, so the current behavior is functionally correct. However, a future reader might expect the start/end format assignment to be guarded by this.props.showMultiDayTimes. The behavior is not a bug, but a brief inline comment explaining why the guard is intentionally absent would prevent confusion:

// These formats are used by RBC only when showMultiDayTimes=true; safe to set unconditionally.
formats.eventTimeRangeStartFormat = ...
formats.eventTimeRangeEndFormat = ...

Positives

  • The property is purely additive with defaultValue="false", guaranteeing zero behavioral change for existing apps — the proposal's explicit "must NOT break" constraint is well-enforced.
  • showEventDate=false correctly blanks all three time-range format functions (range, start, end) in a single guarded block at the end of buildFormats, making the invariant easy to audit.
  • Unit tests cover all specified scenarios from the spec: true/false pass-through, correct separator positions, shared time pattern, no formats when timeFormat is absent, and showEventDate hiding.
  • Snapshot was updated correctly — the old min/max Date .toString() values (locale-dependent) are replaced with deterministic .toISOString() strings, making the snapshot more portable.
  • CHANGELOG entry is present and user-facing (describes observable widget behavior, not implementation detail).

@rahmanunver
rahmanunver merged commit 5a8770f into main Jul 27, 2026
14 of 15 checks passed
@rahmanunver
rahmanunver deleted the feat/showMultiDayTimes_Property-migrated branch July 27, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants